<template>
    <div class="scrolltop">
        <el-button type="primary" v-on:click="scrollToTop" icon="arrow-up"></el-button>
    </div>
</template>
<script>
    export default {
        methods:{
            scrollToTop:function () {window.scrollTo(0,0);}
        }
    };
</script>
<style>
    .scrolltop{
        position: fixed;
        display: block;
        bottom: 10px;
        right: 10px;
    }
</style>